package cn.bonoon.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 某一个账户用户密码的修改列表记录
 * @author jackson
 *
 */
@Entity
@Table(name = "t_accountpwd")
public class AccountPasswordEntity extends AbstractCreatableEntity{

	private static final long serialVersionUID = 1334136871910109609L;

	@ManyToOne
	@JoinColumn(name = "R_ANNOUNCEMENT_ID")
	private AccountEntity account;

	@Column(name = "C_OLDPASSWORD")
	private String oldPassword;

	@Column(name = "C_NEWPASSWORD")
	private String newPassword;
	
	/** 表示这次的修改密码是自己改的，还是他人(管理员)改的 */
	private boolean self;

	public AccountEntity getAccount() {
		return account;
	}

	public void setAccount(AccountEntity account) {
		this.account = account;
	}

	public String getOldPassword() {
		return oldPassword;
	}

	public void setOldPassword(String oldPassword) {
		this.oldPassword = oldPassword;
	}

	public String getNewPassword() {
		return newPassword;
	}

	public void setNewPassword(String newPassword) {
		this.newPassword = newPassword;
	}

	public boolean isSelf() {
		return self;
	}

	public void setSelf(boolean self) {
		this.self = self;
	}
	
	
}
